package com.wms.controller;
import com.wms.dto.ConfirmPackageDto;
import com.wms.pojo.PageResult;
import com.wms.pojo.Result;
import com.wms.service.OutboundOrderPackageService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/outboundOrderPackage")
@RequiredArgsConstructor
public class OutboundOrderPackageController {

    private final OutboundOrderPackageService packageService;

    @GetMapping
    public Result queryPage(Integer page,Integer pageSize,Integer status,String packageCode,String customerName){
        PageResult pageResult = packageService.queryPage(page,pageSize,status,packageCode,customerName);
        return Result.success(pageResult);
    }

    //确定打包
    @PutMapping
    public Result updateById(@RequestBody ConfirmPackageDto dto){
        packageService.updateByIdStatus(dto);
        return Result.success();
    }
}
    